﻿using System;
using System.Collections.Generic;
using System.Text;
using GAIQ;

namespace DCIMAP.GANS.GeneticAlgorithms.Legacy
{
    class StringArrayGenerator: Generator
    {
        

        public StringArrayGenerator() {    
        }

        

         public override Gene Generate()
         {
             const int length = 3;
             StringArrayGene gene = new StringArrayGene(length);
             int n = Algorithm.Random.Next(2);
             if (n == 0) { gene.StringCode[0] = "x"; }
             else { gene.StringCode[0] = "1"; }
             n = Algorithm.Random.Next(2);
             if (n == 0) { gene.StringCode[1] = "y"; }
             else { gene.StringCode[1] = "1"; }
             n = Algorithm.Random.Next(ListOp.getLength());
             gene.StringCode[2] = ListOp.getSymbols()[n];
             return gene;
         }
    }
}
